﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类bExchange
	/// </summary>
	[Serializable]
	public class bExchange : Entity 
	{ 
		 public bExchange() 
            : base("bExchange") 
        { 

        }


		#region Model
		private int _UID;
		private int? _CurrencyID;
		private string _Exchange;
		private string _FromDate;
		private string _DestDate;
		private string _Note;
		private bool? _IsDisable;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CurrencyID
		{
			get{ return _CurrencyID; }
			set
			{
				this.OnPropertyValueChange(_.CurrencyID,_CurrencyID,value);
				this._CurrencyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Exchange
		{
			get{ return _Exchange; }
			set
			{
				this.OnPropertyValueChange(_.Exchange,_Exchange,value);
				this._Exchange = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FromDate
		{
			get{ return _FromDate; }
			set
			{
				this.OnPropertyValueChange(_.FromDate,_FromDate,value);
				this._FromDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DestDate
		{
			get{ return _DestDate; }
			set
			{
				this.OnPropertyValueChange(_.DestDate,_DestDate,value);
				this._DestDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.CurrencyID,
				_.Exchange,
				_.FromDate,
				_.DestDate,
				_.Note,
				_.IsDisable,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_CurrencyID,
				_Exchange,
				_FromDate,
				_DestDate,
				_Note,
				_IsDisable,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "CurrencyID":
                    this._CurrencyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "Exchange":
                    this._Exchange = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FromDate":
                    this._FromDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DestDate":
                    this._DestDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "CurrencyID":
                    return this._CurrencyID; 
				case "Exchange":
                    return this._Exchange; 
				case "FromDate":
                    return this._FromDate; 
				case "DestDate":
                    return this._DestDate; 
				case "Note":
                    return this._Note; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","bExchange");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","bExchange","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CurrencyID = new Field("CurrencyID","bExchange","CurrencyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Exchange = new Field("Exchange","bExchange","Exchange");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FromDate = new Field("FromDate","bExchange","FromDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DestDate = new Field("DestDate","bExchange","DestDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","bExchange","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","bExchange","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","bExchange","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","bExchange","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","bExchange","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","bExchange","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","bExchange","ModifyDate");
		}
		#endregion

 
	}
}

